package com.zm.xiaohashu.user.api;

import com.zm.response.Response;
import com.zm.xiaohashu.user.constant.ApiConstants;
import com.zm.xiaohashu.user.model.vo.FindUserByIdReqDTO;
import com.zm.xiaohashu.user.model.vo.FindUserByIdRspDTO;
import com.zm.xiaohashu.user.model.vo.FindUsersByIdsReqDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = ApiConstants.SERVICE_NAME, path = "/user")
public interface UserFeignApi {

    /**
     * 根据用户 ID 查询用户信息
     *
     * @param findUserByIdReqDTO
     * @return
     */
    @PostMapping("/findById")
    Response<FindUserByIdRspDTO> findById(@RequestBody FindUserByIdReqDTO findUserByIdReqDTO);

    /**
     * 根据用户 ID 批量查询用户信息
     *
     * @param findUsersByIdsReqDTO
     * @return
     */
    @PostMapping("/findByIds")
    Response<List<FindUserByIdRspDTO>> findByIds(@RequestBody FindUsersByIdsReqDTO findUsersByIdsReqDTO);
}